Skip to content

Fix crossing rail not working with experimental minecart improvements#21

Open
mbmikaelyan wants to merge 2 commits intoFXCourel:1.21.11from
mbmikaelyan:fix/crossing-rail-experimental-minecarts
Open

Fix crossing rail not working with experimental minecart improvements#21
mbmikaelyan wants to merge 2 commits intoFXCourel:1.21.11from
mbmikaelyan:fix/crossing-rail-experimental-minecarts

Conversation

@mbmikaelyan
Copy link
Copy Markdown

NewMinecartBehaviorMixin was missing the getRailShape() logic that OldMinecartBehaviorMixin had, so crossing direction switching was never applied when experimental minecarts were enabled.

Also updates isPoweringRail signatures to match the changed BlockState.is(Object) signature in 26.1.

I used Claude.Ai for this

NewMinecartBehaviorMixin was missing the getRailShape() logic that
OldMinecartBehaviorMixin had, so crossing direction switching was
never applied when experimental minecarts were enabled.

Also updates isPoweringRail signatures to match the changed
BlockState.is(Object) signature in 26.1.
Replaced two ordinal-based redirects with a single redirect that
intercepts all getValue calls in moveAlongTrack and uses a type check
to only apply the crossing rail shape fix when the property is a
RailShape. This avoids fragile ordinal counting and correctly handles
the mixed Boolean/RailShape getValue calls in the method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant